package com.restaurant.mapper;



import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.restaurant.entity.Good;
import com.restaurant.entity.TaskRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface GoodMapper extends BaseMapper<Good> {
    @Select("SELECT COUNT(*) AS count\n" +
            "FROM good\n" +
            "WHERE type = '谷物';\n")
    int countGrains();
    @Select("SELECT COUNT(*) AS count\n" +
            "FROM good\n" +
            "WHERE type = '水果';\n")
    int countFruits();
    @Select("SELECT COUNT(*) AS count\n" +
            "FROM good\n" +
            "WHERE type = '豆类';\n")
    int countLegumes();
    @Select("SELECT COUNT(*) AS count\n" +
            "FROM good\n" +
            "WHERE type = '蔬菜';\n")
    int countVegetables();


}
